<%-- 
    Document   : jsonObtenerIdDocumentoTramite
    Created on : 25/08/2010, 12:30:34 PM
    Author     : GCC
--%>
<%@ page contentType="application/json; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="pe.gob.pnp.despachadores.*" %>
<%@ page import="pe.gob.pnp.actions.*" %>
<%@ page import="java.util.*"%>
<%@ page import="java.sql.*"%>
<%
    String dependencia  = (request.getParameter("dependencia")==null)?"0":request.getParameter("dependencia");
    String tipodocumento = (request.getParameter("tipodocumento")==null)?"0":request.getParameter("tipodocumento");
    if (dependencia.equals("")){
        dependencia = "0";
    }
    if (tipodocumento.equals("")){
        tipodocumento = "0";
    }
    String id = "0000001";
    try {
        id= TramiteDespachador.obtenerIDDocumento(Integer.parseInt(dependencia), Integer.parseInt(tipodocumento));
    } catch (Exception er) {
        er.printStackTrace();
        id = "0000001";
    }
%>
{
    numerodocumento:"<%=id%>"
}